<template>
  <div>
    <a-row>
      <a-col :offset="6" :span="8">
        <a-card title="新增费用类型">
          <a-form v-bind="layout">
            <a-form-item label="类型名称" v-bind="validateInfos.name">
              <a-input v-model:value="newParam.name" />
            </a-form-item>

            <a-form-item label="备注" v-bind="validateInfos.remark">
              <a-input v-model:value="newParam.remark" />
            </a-form-item>
            <a-form-item :wrapper-col="{ span: 14, offset: 8 }">
              <a-button type="primary" @click="addExpenseType">确定</a-button>
              <a-button style="margin-left: 30px" @click="reset">重置</a-button>
            </a-form-item>
          </a-form>
        </a-card>
      </a-col>
    </a-row>
  </div>
</template>

<script lang="ts" setup>
import { useExpenseTypeAddFunctions } from '@/views/finance/expense-type/add/expenseTypeAddFuntions'
const { newParam, addExpenseType, validateInfos, reset, layout } = useExpenseTypeAddFunctions()
</script>
